package com.sino.config.server.bean.project;

import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.nutz.dao.entity.annotation.ColDefine;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Comment;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;
import org.nutz.lang.Times;

import com.sino.config.server.bean.Entity;

/**
 * @author kerbores
 *
 */
@Table("t_application")
@Comment("应用")
public class Application extends Entity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Name
	@Column("a_name")
	@Comment("应用名称")
	@NotNull(message = "应用名称不能为空")
	String name;

	@Column("a_descr")
	@Comment("应用描述")
	@ColDefine(width = 200)
	@Size(max = 200, message = "应用描述信息不能超过200字符")
	String description;

	@Column("a_owner_id")
	@Comment("应用管理员 id")
	long ownerId;

	@Column("a_create_time")
	@Comment("应用创建时间")
	Date createTime = Times.now();

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the ownerId
	 */
	public long getOwnerId() {
		return ownerId;
	}

	/**
	 * @param ownerId
	 *            the ownerId to set
	 */
	public void setOwnerId(long ownerId) {
		this.ownerId = ownerId;
	}

	/**
	 * @return the createTime
	 */
	public Date getCreateTime() {
		return createTime;
	}

	/**
	 * @param createTime
	 *            the createTime to set
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}
